<?php
include 'Db.php';
include 'input.php';

$username = trim($input->post("username"));
$name = addslashes(htmlspecialchars($username));
$password = trim($input->post("password"));

$photo = $_FILES['photo'];
$purl = 'upload/'.$photo['name'];
$ppurl = $_SERVER["DOCUMENT_ROOT"].'/phpcms/'.$purl;

echo $ppurl;
echo $purl;
move_uploaded_file($photo['tmp_name'],$ppurl);

$download = $_FILES['download'];
$durl = 'upload/'.$download['name'];
$ddurl = $_SERVER["DOCUMENT_ROOT"].'/phpcms/'.$durl;
move_uploaded_file($download['tmp_name'],$ddurl);

$video = trim($input->post("video"));
$mvideo = urlencode($video);

echo $mvideo."===========================";
$t = time();

echo '<hr/>';
echo $username;
echo $name;
echo '<hr/>';

$sql = "insert into user(username,password,photo,video,download,shijian) 
values('{$name}','{$password}','{$purl}','{$mvideo}','{$durl}','{$t}')";
$dbs->getQuery($sql);
echo $sql;
//header("Location:list.php");
echo '<br/>';
echo md5("qwe");

$h =  "<h1>12;；31145‘6 '' |”“ |</h1>";

$sts = htmlspecialchars($h);
$t = addslashes($sts); 
echo $t;

$sql = "insert into user(username) values('{$t}')";
$dbs->getQuery($sql);

$q = "t\/a\'anb";

echo stripcslashes($q);